snmpkey - Create a SNMPv3 security key for the Net::SNMP module |
snmpkey - Create a SNMPv3 security key for the Net::SNMP module
The snmpkey
utility generates a security key based on a password and
an authoritativeEngineID passed on the command line. This key can then
be used by the Net::SNMP module instead of the plain text password when
creating SNMPv3 objects.
snmpkey md5|sha1 <password> <authoritativeEngineID>
The User-based Security Model used by SNMPv3 defines an algorithm which ``localizes'' a plain text password to a specific authoritativeEngineID using a one-way hash. This resulting key is used by the SNMP application instead of the plain text password for security reasons.
The Net::SNMP module allows the user to either provide a plain text password
or a localized key to the object constructor when configuring authentication
or privacy. The snmpkey
utility can be used to generate the key to be
used by the -authkey or -privkey named arguments when they are passed
to the Net::SNMP session()
constructor.
The snmpkey
utility expects three command line arguments. The first
argument defines which hash algorithm to use when creating the key. Either
MD5 (RFC 1321) or SHA-1 (NIST FIPS PUB 180) can be specified with the
string 'md5' or 'sha1' respectively. This choice must match the
algorithm passed to the -authprotocol argument when creating Net::SNMP
objects. The second argument is the plain text password that is to be
localized. The final argument is the authoritativeEngineID of the remote
SNMP engine associated with the Net::SNMP argument -hostname. The
authoritativeEngineID is to be entered as a hexadecimal string 10 to 64
characters (5 to 32 octets) long and can be prefixed with an optional ``0x''.
David M. Town <dtown@cpan.org>
Copyright (c) 2001-2002 David M. Town. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
snmpkey - Create a SNMPv3 security key for the Net::SNMP module |